<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<%@ page import="com.colabo.j2ee.web.oaf.menu.action.MenuAction,
				com.colabo.j2ee.web.core.vo.SessionUserHolder,
				com.colabo.j2ee.web.core.common.SessionConstants" 
%>
<%
	MenuAction action = new MenuAction();
	String menuJson = action.getAllMenusFromPersistence();
	
	SessionUserHolder suser = (SessionUserHolder)request.getSession(false).getAttribute(SessionConstants.USER);  
	String staffname = suser.getStaffName();
	String loginName = suser.getLoginId();  
%>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=8" />
	<meta http-equiv="Cache-Control" content="no-cache" /> 

	<title>CAP4J - New Web Face</title>
	<meta name="description" content="A web applications user interface library built on the Mootools JavaScript framework" />

	<link rel="stylesheet" type="text/css" href="../resources/themes/default/css/Content.css" />
	<link rel="stylesheet" type="text/css" href="../resources/themes/default/css/Core.css" />
	<link rel="stylesheet" type="text/css" href="../resources/themes/default/css/Layout.css" />
	<link rel="stylesheet" type="text/css" href="../resources/themes/default/css/Dock.css" />
	<link rel="stylesheet" type="text/css" href="../resources/themes/default/css/Window.css" />
	<link rel="stylesheet" type="text/css" href="../resources/themes/default/css/Tabs.css" />
	<link rel="stylesheet" type="text/css" href="../resources/plugins/mochaTree/style.css" />
	<!--[if IE]>
		<script type="text/javascript" src="../resources/scripts/excanvas_r43.js"></script>
	<![endif]-->
	
	<style type="text/css">
		.af_description {
			text-align: right;
		}
		
	</style>

	
    <script type="text/javascript" src="../resources/scripts/mootools-1.2.4-core-yc.js"></script>
    <script type="text/javascript" src="../resources/scripts/mootools-1.2.4-more-yc.js"></script>
    <script type="text/javascript" src="../resources/scripts/mocha.js"></script>
    <script type="text/javascript" src="../resources/scripts/1colwithTabs-init.js"></script>
    <script type="text/javascript" src="../resources/plugins/mochaTree/Tree.js"></script>
	<script type="text/javascript" src="../resources/plugins/mochaNavBar/navbar.js"></script>
	<script type="text/javascript" src="../resources/plugins/JustTheTip/JustTheTip.js"></script>
	<script type="text/javascript" src="../resources/scripts/mocha-enhanced.js"></script>
	<script type="text/javascript">
		    nodes = <%=menuJson%>;
		    new MUI.NavBar({
		        container:'desktopNavbar',
		        id:'desktopNavbar',
		        nodes:nodes,
		        textField:'menuName',
		        valueField:'menuUrl'
		    });
		
	
	</script>
</head>
<body>

<div id="desktop">

	<div id="desktopHeader">
		<div id="desktopTitlebarWrapper">
			<div id="desktopTitlebar">
				<h1 class="applicationTitle">OAF </h1>
				<h2 class="tagline">CAP4J <span class="taglineEm">3.0 ALPHA</span></h2>
				<div id="topNav">
					<ul class="menu-right">
						<li>欢迎 <a href="#" onclick="MochaUI.notification('<%=staffname%>的个人信息');return false;"><%=staffname%>(<%=loginName %>)</a></li>
						<li><a href="<%=request.getContextPath() %>/j_acegi_logout">退出</a></li>
					</ul>
				</div>
			</div>
		</div>
	
		<div id="desktopNavbar">	
			<div class="toolbox divider">
				<div id="spinnerWrapper">
					<div id="spinner">
					</div>
				</div>		
			</div>
			
			<div class="toolbox divider">	
				<select id="themeControl" name="themeControl" size="1" onchange="MochaUI.Themes.init(this.options[this.selectedIndex].value)">
					<option id="chooseTheme" value="selected">更换皮肤:</option>
					<option value="default">默认</option>
					<option value="Charcoal">深灰</option>
				</select>	
			</div>		
		</div><!-- desktopNavbar end -->
	</div><!-- desktopHeader end -->

	<div id="dockWrapper">
		<div id="dock">
			<div id="dockPlacement"></div>
			<div id="dockAutoHide"></div>
			<div id="dockSort"><div id="dockClear" class="clear"></div></div>
		</div>
	</div>

	<div id="pageWrapper"></div>

</div><!-- desktop end -->

</body>
</html>

